package org.suk.dp.state;

import java.text.MessageFormat;

/**
 * Description: 上午工作状态<br/>
 * @version V1.0  2017/6/21 11:24  by 石冬冬(dongdong.shi@ucarinc.com) - Heil Hitler
 */
public class ForenoonState extends State {
    @Override
    void writeProgram(Work work) {
        if(work.getHour() < 12){
            System.out.println(MessageFormat.format("当前时间：{0}点 上午工作，精神百倍",work.getHour()));
        }else{
            work.setState(new NoonState());
            work.writeProgram();
        }
    }
}
